﻿@model IEnumerable<TeamOPSchoolCup.Domain.POCO.NSSF>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Street
        </th>
        <th>
            Zipcode
        </th>
        <th>
            City
        </th>
        <th>
            PhoneNumber
        </th>
        <th>
            FaxNumber
        </th>
        <th>
            Email
        </th>
        <th>
            DateAdded
        </th>
        <th>
            Region
        </th>
        <th>
            NSSFRep
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Street)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Zipcode)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PhoneNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FaxNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateAdded)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Region.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NSSFReps.First().Member.Name)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.NSSFId }) |
            @Html.ActionLink("Details", "Details", new { id=item.NSSFId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.NSSFId })
        </td>
    </tr>
}

</table>
